import { createApp } from 'vue'
// import './style.css'
import App from './components/DynamicComponent.vue'
const app = createApp(App)

// app.directive('fontSize', {
//   mounted: (el) => {
//     el.style.fontSize = '24px';
//   },
// })
// 函数形式
// app.directive('fontSize', (el, binding) => {
//     console.log(binding.value)
//     binding.value = '18px'
//     el.style.fontSize = binding.value
//     console.log(binding.value)  
// })

// app.directive('fontSize',{
//   mounted: el=>{
//     el.style.fontSize='12px';
//   },
//   updated: (el,binding)=>{
//     el.style.fontSize=binding.value;
//   }
// })

app.directive('fontSize',(el,binding)=>{
  el.style.fontSize=binding.value;
})
app.mount('#app')
